<div class="col-sm-9 content-right">
  <ol class="breadcrumb">
    <li><a class="route-controller" href="<?php echo site_url('home'); ?>">Home</a></li>
    <li>Category</li>
  </ol>
  <h3>
    Category
  </h3>
  <div class="input-group input-group-sm pull-right">
    <input type="text" class="form-control" placeholder="Search Item" onkeyup="searchCategory(this)"/>
  </div>
  <ul class="nav nav-tabs">
    <li class="active"><a class="route-controller" href="<?php echo site_url('category/items'); ?>">Items</a></li>
    <li><a class="route-controller" href="<?php echo site_url('category/brands'); ?>">Brands</a></li>
  </ul>
  <div class="tab-content">
    <?php if (!empty($categories)) { ?>
      <?php foreach ($categories as $category) { ?>
        <div class="page-header">
          <h4><?php echo $category['category_name']; ?></h4>
        </div>
        <?php if (!empty($category['items'])) { ?>
          <?php foreach ($category['items'] as $brand) { ?>
            <a class="route-controller btn btn-default mar-btm-10 cat-search-value" href="<?php echo site_url('category/' . $category['category_id'] . '/' . urlfy_text($category['category_name']) . '?items[]=' . $brand['item_id']); ?>"><?php echo $brand['item_name']; ?></a>
          <?php } ?>
        <?php } else { ?>
          <div class="alert alert-danger">
            No items in this category
          </div>
        <?php } ?>
      <?php } ?>
    <?php } else { ?>
      <div class="height-gap-10"></div>
      <div class="alert alert-danger">
        No Categoreis
      </div>
    <?php } ?>
  </div>
</div>